﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace AgreementOpenExe
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                string arg = args[0];
                string[] sarray = arg.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                string proPath = "";
                string address = "";
                sarray.ToList().ForEach(item =>
                {
                    if (item.IndexOf("copen://") != -1)
                    {
                        proPath = System.Web.HttpUtility.UrlDecode(item.Replace("copen://", ""));
                    }
                    else
                    {
                        address = System.Web.HttpUtility.UrlDecode(item);
                    }
                });
                System.Diagnostics.Process.Start(proPath, address);
            }
        }
    }
}
